<% title "Topics" %>

<table>
  <tr>
    <th>Name</th>
    <th>Autor</th>
    <th>Replies</th>
    <th>Last Post At</th>
  </tr>
  <% for topic in @topics %>
    <tr>
      <td><%= topic.name %></td>
      <td><%= topic.nombre_autor %></td>
      <td><%= topic.posts.count %></td>
      <td><%= topic.last_post_at %></td>
      <td><%= link_to "Show", topic %></td>
      <td><%= link_to "Edit", edit_topic_path(topic) %></td>
      <td><%= link_to "Destroy", topic, :confirm => 'Are you sure?', :method => :delete %></td>
    </tr>
  <% end %>
</table>

<p><%= link_to "New Topic", new_topic_path %></p>
